package com.xinfu.newproject.adapter;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.ArrayList;

public class TicketPagerAdapter extends FragmentPagerAdapter {
    private ArrayList<Fragment> mData;


    public TicketPagerAdapter(FragmentManager fm, ArrayList<Fragment> mData) {
        super(fm);
        this.mData = mData;
    }

    @Override
    public Fragment getItem(int position) {

        return mData.get(position);
    }

    @Override
    public int getCount() {
        return mData==null ? 0 : mData.size();
    }
}